/**
 * 
 */
package model.session;


/**
 * Status of a {@link CNFUse}.
 * 
 * @author GRONOWSKI Stephane svan001@aol.com
 * 
 *         igsat 2010
 * 
 */
public enum CNFUseStatus {
	PROVED_SAT ("PROVED_SAT"), IRRELEVANT ("IRRELEVANT"), PROVED_UNSAT ("PROVED_UNSAT"), TO_BE_DETERMINED ("TO_BE_DETERMINED");

	// private boolean first ;
	private String	xmlValue;

	private CNFUseStatus(String xmlValue) {
		this.xmlValue = xmlValue;
	}

	/**
	 * Return the xmlValue, value that is supposed to written in the xml exportation.
	 * 
	 * @return the xmlValue
	 */
	public String getXmlValue() {
		return xmlValue;
	}

	/**
	 * Return the {@link CNFUseStatus} associate to a value find in a XML exportation.
	 * 
	 * @param value
	 *            xml value
	 * @return the associate {@link CNFUseStatus}
	 */
	public static CNFUseStatus getValueFromXML(String value) {
		for (CNFUseStatus sol : values())
			if (sol.getXmlValue().equals(value))
				return sol;
		return null;
	}
}
